package com.xiaoq.users.emchat.comm.body;

import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.databind.node.ContainerNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.xiaoq.users.emchat.comm.wrapper.BodyWrapper;

public class IMPasswordBody implements BodyWrapper{
	
	private String newpassword;
	
	

	public IMPasswordBody(String newpassword) {
		super();
		this.newpassword = newpassword;
	}

	@Override
	public ContainerNode<?> getBody() {
		return JsonNodeFactory.instance.objectNode().put("newpassword", newpassword);
	}

	@Override
	public Boolean validate() {
		return StringUtils.isNotBlank(newpassword);
		
	}

	public String getNewpassword() {
		return newpassword;
	}

	public void setNewpassword(String newpassword) {
		this.newpassword = newpassword;
	}

}
